import Sequelize from 'sequelize';
import baseDao from '../lib/baseDao.js'; // 数据库操作
import User from './user.js'

const Modal = baseDao.sequelize.define('t_trade_order', {
  // 属性
  id: {
    type: Sequelize.INTEGER,
    primaryKey: true, // 主键
    autoIncrement: true, // 自增
    allowNull: true,
    validate: {
      len: [1, 50]
    }
  },
  PI单号: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  客户编码: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  销售部门: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  业务员: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  客户国家: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  客户交货日期: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  贸易条款: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  起运港: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  物料代码: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  物料名称: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  客户货号: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI箱数: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI数量: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI销售单价: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI销售币别: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI卖出汇率: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  当前系统汇率: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI金额: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI折扣后金额: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI订单利润: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  体积: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  审核状态: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  订单状态: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  出库状态: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO单号: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO工厂币别: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO制单日期: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  工厂交货日期: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  工厂入库日: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  采购员: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  工厂编码: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  工厂名称: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  工厂货号: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO箱数: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO数量: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO最终单价: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO金额: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  未出货数量: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  未出货箱数: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  未出货金额: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  未出货折扣后金额: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  未出货采购成本: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  预计货好日期: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  货期备注: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  更新后开船日期: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI客户收款条件: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI客户收款信用账期: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI收款日期: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PI收款金额RMB: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO采购付款条件: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO采购信用账期: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO付款日期: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
  PO付款金额: {
    type: Sequelize.STRING,
    allowNull: true,
    validate: {
      len: [0, 255]
    },
    comment: ''
  },
}, {
    // 参数
  });

//向外暴露
export default {
  Modal,
}